Skip to main content

Fill a position group object with code in a stream

In order to do this, the lookup on the form is first selected in the variable. User ids should be kept in the Value of the Lookup object. Type text must be selected in the stream variable.

public void Function1_Execute(object sender, OnExecuteEventArguments args) { Adding the users selected in the Lookup object on the Document in the Flow Variable to the Position Group string strUsers = VarUsers.Value.ToString(); VarUsers is the variable that depends on the Lookup, and the string must be assigned to the variable. string[] userIdList = strUsers.Split(','); The value separator in the lookup object is shredded according to what is selected and assigned to the array. foreach (var userId in userIdList) // the array containing the ids is crawled { PositionGroup1.AddConstantUser(userId); each id is added to the Position Group object. } }